[flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor#17712
Merged
ntBre merged 7 commits intoastral-sh:mainfrom May 1, 2025
Merged
[flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor#17712ntBre merged 7 commits intoastral-sh:mainfrom
flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor#17712ntBre merged 7 commits intoastral-sh:mainfrom
Conversation
…ssed a file descriptor or bytes string
Contributor
|
MichaReiser
reviewed
Apr 30, 2025
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/replaceable_by_pathlib.rs
Outdated
Show resolved
Hide resolved
MichaReiser
approved these changes
May 1, 2025
Member
MichaReiser
left a comment
There was a problem hiding this comment.
Thank you. Lets remove the bytes string handling for now (sorry for that)
flake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor or bytes stringflake8-use-pathlib] Fix PTH104false positive when rename is passed a file descriptor
Contributor
|
Oh thanks for opening the other PR! We were preparing for the release today and I just pushed similar changes here. I opted to leave the test cases, but otherwise they look very similar. |
dhruvmanila
approved these changes
May 1, 2025
...lake8_use_pathlib/snapshots/ruff_linter__rules__flake8_use_pathlib__tests__full_name.py.snap
Show resolved
Hide resolved
dcreager
added a commit
that referenced
this pull request
May 2, 2025
* main: [red-knot] Refactor: no mutability in call APIs (#17788) [red-knot] Fix panic for `tuple[x[y]]` string annotation (#17787) [red-knot] Implicit instance attributes in generic methods (#17769) doc: Add link to `check-typed-exception` from `S110` and `S112` (#17786) Fix module name in ASYNC110, 115, and 116 fixes (#17774) [red-knot] More informative hover-types for assignments (#17762) [syntax-errors] Use consistent message for bad starred expression usage. (#17772) red_knot_server: add auto-completion MVP Allow passing a virtual environment to `ruff analyze graph` (#17743) Bump 0.11.8 (#17766) [`flake8-use-pathlib`] Fix `PTH104`false positive when `rename` is passed a file descriptor (#17712)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Contains the same changes to the semantic type inference as #17705.
Fixes #17694
Test Plan
Snapshot tests.